#ifndef OPERATION_DIALOG_H
#define OPERATION_DIALOG_H

#include <QDialog>
#include <QtGui>
#include "src/scene.h"
#include "combinedObject.h"
#include "objectTreeItem.h"

class OperationDialog : public QDialog{
    Q_OBJECT

    public:
        OperationDialog(CombinedObject *, ObjectTreeItem *, QTreeWidgetItem *, Scene *, QWidget * = 0);
        ~OperationDialog();

    signals:
        void done();

    private:
        CombinedObject *combinedObject;
        ObjectTreeItem *item;
        QTreeWidgetItem *root;
        Scene *scene;
        int operation, ambientR, ambientG, ambientB, diffuseR, diffuseG, diffuseB, specularR, specularG, specularB;
        bool remove;

        QGroupBox *operationBox;
        QPushButton *ambientPushButton;
        QPushButton *diffusePushButton;
        QPushButton *specularPushButton;

        void createLayout();
        void setButtonColor();

    private slots:
        void change();
        void changeAmbient();
        void changeDiffuse();
        void changeSpecular();
        void changeOperation(int);
        void removeOperation(bool);
};

#endif

